var CANVAS_WIDTH = 200,CANVAS_HEIGHT = 200;
window.onload = function (){
    createCanvas()
}
/* 创建canvas的方法 */

function createCanvas(){
    document.body.innerHTML = "<canvas id=\"mycanvas\" width=\""+CANVAS_WIDTH +"\" height=\""+CANVAS_HEIGHT+"\"></canvas>"
}